Skip to content

fix(monorepo): unbreak Docker build (workspaces glob+negation)#2952

Merged
tofikwest merged 1 commit into
mainfrom
tofik/fix-mcp-workspaces-glob
May 28, 2026
Merged

fix(monorepo): unbreak Docker build (workspaces glob+negation)#2952
tofikwest merged 1 commit into
mainfrom
tofik/fix-mcp-workspaces-glob

Conversation

@tofikwest
Copy link
Copy Markdown
Contributor

@tofikwest tofikwest commented May 28, 2026

PR #2950 (merged earlier) enumerated workspaces explicitly to exclude `apps/mcp-server`, but that broke the API's Docker build in the auto-PR to release:

```
error: Workspace not found "apps/app"
error: Workspace not found "apps/framework-editor"
error: Workspace not found "apps/portal"
```

The Dockerfile only COPYs `apps/api` into the build context, so when bun reads `package.json` and tries to find the other named apps, it fails. The original `apps/*` glob worked because globs only match what exists; explicit paths require the path to exist.

Fix

Combine glob with negation:

```json
["apps/", "!apps/mcp-server", "packages/"]
```

`apps/*` matches only what exists in any given context (whether full repo or Docker subset), while `!apps/mcp-server` excludes `apps/mcp-server` from the bun workspace.

Verified locally

  • `bun install` at root succeeds
  • `node_modules/@trycompai/mcp-server` is NOT created (i.e. mcp-server stays outside the workspace)
  • `bun.lock` has zero references to `apps/mcp-server` as a workspace member
  • Original Docker-friendly glob behavior is preserved (globs match only existing paths in the Docker context)

This keeps the Speakeasy fix from PR #2950 (mcp-server outside the workspace → no `workspace:*` protocol errors in Speakeasy CI) while restoring the Docker-compatible glob.

Test plan

  • Local `bun install` succeeds
  • mcp-server is excluded from the workspace
  • Docker build for the API succeeds after this merges (verify in the auto-PR to release once it re-runs)
  • Generate workflow for MCP succeeds (verify by manually triggering it after this merges)

🤖 Generated with Claude Code

PR #2950 enumerated workspaces explicitly to exclude apps/mcp-server,
but that broke the API's Docker build:

  error: Workspace not found "apps/app"
  error: Workspace not found "apps/framework-editor"
  error: Workspace not found "apps/portal"

The Dockerfile only COPYs apps/api into the build context, so when bun
reads package.json and tries to find the other named apps, it fails.
The original "apps/*" glob worked because globs only match what exists;
explicit paths require the path to exist.

Fix: combine glob with negation —

  ["apps/*", "!apps/mcp-server", "packages/*"]

Verified locally:
- bun install at root succeeds
- node_modules/@trycompai/mcp-server is NOT created
- bun.lock has zero references to apps/mcp-server
- Original Docker-friendly glob behavior preserved (matches only existing paths)

This unbreaks the API Docker build that PR #2950 broke, while still
keeping apps/mcp-server outside the bun workspace so Speakeasy's CI
npm install doesn't choke on workspace:* protocol.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Building Building Preview, Comment May 28, 2026 7:43pm
comp-framework-editor Building Building Preview, Comment May 28, 2026 7:43pm
portal Building Building Preview, Comment May 28, 2026 7:43pm

Request Review

@tofikwest tofikwest merged commit ae6cdff into main May 28, 2026
6 of 9 checks passed
@tofikwest tofikwest deleted the tofik/fix-mcp-workspaces-glob branch May 28, 2026 19:43
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.65.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants